3.8.8 \(\int x^{-4+n} (a+b x)^{-n} \, dx\)

Optimal. Leaf size=110 \[ -\frac {2 b^2 x^{n-1} (a+b x)^{1-n}}{a^3 (1-n) (2-n) (3-n)}+\frac {2 b x^{n-2} (a+b x)^{1-n}}{a^2 (2-n) (3-n)}-\frac {x^{n-3} (a+b x)^{1-n}}{a (3-n)} \]

________________________________________________________________________________________

Rubi [A]  time = 0.04, antiderivative size = 110, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, integrand size = 15, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.133, Rules used = {45, 37} \begin {gather*} -\frac {2 b^2 x^{n-1} (a+b x)^{1-n}}{a^3 (1-n) (2-n) (3-n)}+\frac {2 b x^{n-2} (a+b x)^{1-n}}{a^2 (2-n) (3-n)}-\frac {x^{n-3} (a+b x)^{1-n}}{a (3-n)} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[x^(-4 + n)/(a + b*x)^n,x]

[Out]

-((x^(-3 + n)*(a + b*x)^(1 - n))/(a*(3 - n))) + (2*b*x^(-2 + n)*(a + b*x)^(1 - n))/(a^2*(2 - n)*(3 - n)) - (2*
b^2*x^(-1 + n)*(a + b*x)^(1 - n))/(a^3*(1 - n)*(2 - n)*(3 - n))

Rule 37

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_), x_Symbol] :> Simp[((a + b*x)^(m + 1)*(c + d*x)^(n +
1))/((b*c - a*d)*(m + 1)), x] /; FreeQ[{a, b, c, d, m, n}, x] && NeQ[b*c - a*d, 0] && EqQ[m + n + 2, 0] && NeQ
[m, -1]

Rule 45

Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_), x_Symbol] :> Simp[((a + b*x)^(m + 1)*(c + d*x)^(n + 1
))/((b*c - a*d)*(m + 1)), x] - Dist[(d*Simplify[m + n + 2])/((b*c - a*d)*(m + 1)), Int[(a + b*x)^Simplify[m +
1]*(c + d*x)^n, x], x] /; FreeQ[{a, b, c, d, m, n}, x] && NeQ[b*c - a*d, 0] && ILtQ[Simplify[m + n + 2], 0] &&
 NeQ[m, -1] &&  !(LtQ[m, -1] && LtQ[n, -1] && (EqQ[a, 0] || (NeQ[c, 0] && LtQ[m - n, 0] && IntegerQ[n]))) && (
SumSimplerQ[m, 1] ||  !SumSimplerQ[n, 1])

Rubi steps

\begin {align*} \int x^{-4+n} (a+b x)^{-n} \, dx &=-\frac {x^{-3+n} (a+b x)^{1-n}}{a (3-n)}-\frac {(2 b) \int x^{-3+n} (a+b x)^{-n} \, dx}{a (3-n)}\\ &=-\frac {x^{-3+n} (a+b x)^{1-n}}{a (3-n)}+\frac {2 b x^{-2+n} (a+b x)^{1-n}}{a^2 (2-n) (3-n)}+\frac {\left (2 b^2\right ) \int x^{-2+n} (a+b x)^{-n} \, dx}{a^2 (2-n) (3-n)}\\ &=-\frac {x^{-3+n} (a+b x)^{1-n}}{a (3-n)}+\frac {2 b x^{-2+n} (a+b x)^{1-n}}{a^2 (2-n) (3-n)}-\frac {2 b^2 x^{-1+n} (a+b x)^{1-n}}{a^3 (1-n) (2-n) (3-n)}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.03, size = 64, normalized size = 0.58 \begin {gather*} \frac {x^{n-3} (a+b x)^{1-n} \left (a^2 \left (n^2-3 n+2\right )+2 a b (n-1) x+2 b^2 x^2\right )}{a^3 (n-3) (n-2) (n-1)} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[x^(-4 + n)/(a + b*x)^n,x]

[Out]

(x^(-3 + n)*(a + b*x)^(1 - n)*(a^2*(2 - 3*n + n^2) + 2*a*b*(-1 + n)*x + 2*b^2*x^2))/(a^3*(-3 + n)*(-2 + n)*(-1
 + n))

________________________________________________________________________________________

IntegrateAlgebraic [F]  time = 0.03, size = 0, normalized size = 0.00 \begin {gather*} \int x^{-4+n} (a+b x)^{-n} \, dx \end {gather*}

Verification is not applicable to the result.

[In]

IntegrateAlgebraic[x^(-4 + n)/(a + b*x)^n,x]

[Out]

Defer[IntegrateAlgebraic][x^(-4 + n)/(a + b*x)^n, x]

________________________________________________________________________________________

fricas [A]  time = 0.99, size = 104, normalized size = 0.95 \begin {gather*} \frac {{\left (2 \, a b^{2} n x^{3} + 2 \, b^{3} x^{4} + {\left (a^{2} b n^{2} - a^{2} b n\right )} x^{2} + {\left (a^{3} n^{2} - 3 \, a^{3} n + 2 \, a^{3}\right )} x\right )} x^{n - 4}}{{\left (a^{3} n^{3} - 6 \, a^{3} n^{2} + 11 \, a^{3} n - 6 \, a^{3}\right )} {\left (b x + a\right )}^{n}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^(-4+n)/((b*x+a)^n),x, algorithm="fricas")

[Out]

(2*a*b^2*n*x^3 + 2*b^3*x^4 + (a^2*b*n^2 - a^2*b*n)*x^2 + (a^3*n^2 - 3*a^3*n + 2*a^3)*x)*x^(n - 4)/((a^3*n^3 -
6*a^3*n^2 + 11*a^3*n - 6*a^3)*(b*x + a)^n)

________________________________________________________________________________________

giac [F]  time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {x^{n - 4}}{{\left (b x + a\right )}^{n}}\,{d x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^(-4+n)/((b*x+a)^n),x, algorithm="giac")

[Out]

integrate(x^(n - 4)/(b*x + a)^n, x)

________________________________________________________________________________________

maple [A]  time = 0.01, size = 77, normalized size = 0.70 \begin {gather*} \frac {\left (b x +a \right ) \left (a^{2} n^{2}+2 a b n x +2 b^{2} x^{2}-3 a^{2} n -2 a b x +2 a^{2}\right ) x^{n -3} \left (b x +a \right )^{-n}}{\left (n -3\right ) \left (n -2\right ) \left (n -1\right ) a^{3}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x^(-4+n)/((b*x+a)^n),x)

[Out]

x^(-3+n)*(b*x+a)*(a^2*n^2+2*a*b*n*x+2*b^2*x^2-3*a^2*n-2*a*b*x+2*a^2)/((b*x+a)^n)/(-3+n)/(-2+n)/(-1+n)/a^3

________________________________________________________________________________________

maxima [F]  time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {x^{n - 4}}{{\left (b x + a\right )}^{n}}\,{d x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^(-4+n)/((b*x+a)^n),x, algorithm="maxima")

[Out]

integrate(x^(n - 4)/(b*x + a)^n, x)

________________________________________________________________________________________

mupad [B]  time = 0.52, size = 136, normalized size = 1.24 \begin {gather*} \frac {\frac {x\,x^{n-4}\,\left (n^2-3\,n+2\right )}{n^3-6\,n^2+11\,n-6}+\frac {2\,b^3\,x^{n-4}\,x^4}{a^3\,\left (n^3-6\,n^2+11\,n-6\right )}+\frac {2\,b^2\,n\,x^{n-4}\,x^3}{a^2\,\left (n^3-6\,n^2+11\,n-6\right )}+\frac {b\,n\,x^{n-4}\,x^2\,\left (n-1\right )}{a\,\left (n^3-6\,n^2+11\,n-6\right )}}{{\left (a+b\,x\right )}^n} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x^(n - 4)/(a + b*x)^n,x)

[Out]

((x*x^(n - 4)*(n^2 - 3*n + 2))/(11*n - 6*n^2 + n^3 - 6) + (2*b^3*x^(n - 4)*x^4)/(a^3*(11*n - 6*n^2 + n^3 - 6))
 + (2*b^2*n*x^(n - 4)*x^3)/(a^2*(11*n - 6*n^2 + n^3 - 6)) + (b*n*x^(n - 4)*x^2*(n - 1))/(a*(11*n - 6*n^2 + n^3
 - 6)))/(a + b*x)^n

________________________________________________________________________________________

sympy [F(-1)]  time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x**(-4+n)/((b*x+a)**n),x)

[Out]

Timed out

________________________________________________________________________________________